<?php

namespace App\Models;

use Illuminate\Auth\Authenticatable;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Auth\Passwords\CanResetPassword;
//use Illuminate\Foundation\Auth\Access\Authorizable;
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
use Illuminate\Contracts\Auth\Access\Authorizable as AuthorizableContract;
use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract;

class User extends Model implements AuthenticatableContract,CanResetPasswordContract//,AuthorizableContract
{
    use Authenticatable, CanResetPassword;//,Authorizable

	/**
	 * The database table used by the model.
	 *
	 * @var string
	 */
	protected $table = 'member';
	protected $primaryKey  ='user_id';
    public $timestamps = false;

	/**
	 * The attributes excluded from the model's JSON form.
	 *
	 * @var array
	 */
	protected $hidden = array();

    /**
     * Get the addresses for the user.
     */
    public function addresses(){
        return $this->hasMany('App\Models\Address','user_id','user_id');
    }


	/**
	 * Get the order for the user.
	 */
	public function order(){
		return $this->hasMany('App\Models\Order','buyer_id','user_id');
	}


	public function tourTuanData(){
		return $this->hasMany('App\Models\TourTuanData','user_id','user_id');
	}


}
